Vectors

Vectors are heterogenous mutable structures whose elements are indexed by integers.

The <#1456#>length<#1456#> of a vector is the number of elements that it contains. This number is a non-negative integer that is fixed when the vector is created. The <#1457#>valid indexes<#1457#> of a vector are the exact non-negative integers less than the length of the vector. The first element in a vector is indexed by zero, and the last element is indexed by one less than the length of the vector.

Vectors are written using the notation <#2125#>#(<#1459#>obj<#1459#> )<#2125#>. For example, a vector of length 3 containing the number zero in element 0, the list <#1460#>(2 2 2 2)<#1460#> in element 1, and the string <#1461#>;SPMquot;Anna;SPMquot;<#1461#> in element 2 can be written as following:


#scheme1462#

Note that this is the external representation of a vector, not an expression evaluating to a vector. Like list constants, vector constants must be quoted:


#scheme1464#

<#1466#>Pitman sez: The visual similarity to lists is bound to be confusing to some. Elaborate on the distinction.<#1466#>


#entry1467#


#entry1474#


#entry1484#


#entry1492#


#entry1498#


#entry1510#


#entry1524#


#entry1538#